#-*- coding:utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.db import models

# Create your models here.

class Term(models.Model):
    name = models.CharField(max_length=200)
    slug = models.CharField(max_length=200,blank=True,null=True)
    term_group = models.IntegerField(blank=True,null=True)

class Blog(models.Model):
    class Meta:
        db_table = 'blog'
    post_author = models.ForeignKey(User)
    post_date = models.DateTimeField()
    post_date_gmt = models.DateTimeField(blank=True,null=True)
    post_content = models.TextField()
    comment_count = models.IntegerField()
    visited_count = models.IntegerField()
    terms = models.ManyToManyField(Term)
    post_title = models.TextField(max_length=100)
    post_excerpt = models.TextField(blank=True,null=True)
    post_status = models.CharField(max_length=20,blank=True,null=True)
    comment_status = models.CharField(max_length=20,blank=True,null=True)
    ping_status = models.CharField(max_length=20,blank=True,null=True)
    post_password = models.CharField(max_length=20,blank=True,null=True)
    post_name = models.CharField(max_length=20,blank=True,null=True)
    to_ping = models.TextField(blank=True,null=True)
    pinged = models.TextField(blank=True,null=True)
    post_modified = models.DateTimeField(blank=True,null=True)
    post_modified_gmt = models.DateTimeField(blank=True,null=True)
    post_content_filtered = models.TextField(blank=True,null=True)
    post_parent = models.IntegerField(blank=True,null=True)
    guid = models.CharField(max_length=255,blank=True,null=True)
    menu_order = models.IntegerField(blank=True,null=True)
    post_type = models.CharField(max_length=20,blank=True,null=True)
    post_mime_type = models.CharField(max_length=100,blank=True,null=True)

class Files(models.Model):
    class Meta:
        db_table = 'files'
    filename = models.CharField(max_length=250,blank=True,null=True)
    filesize = models.IntegerField(blank=True,null=True)
